﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "GmFamilyService.h"
#include "IFamilyConnector3d.h"
#include "ContainerUtil.h"
#include "GccpConnectorEnums.h"
#include "FamilyConnectorEnums.h"

namespace gcmp
{
    class IGraphicsBRepEdge;
}

namespace gfam
{
    /// \brief 桥梁连接件
    class GM_FAMILY_SERVICE_EXPORT IFamilyBridgeConnector : public IFamilyConnector3d
    {
        DEFINE_CAST_DERIVED(gfam::IFamilyBridgeConnector, gfam::IFamilyConnector3d)

    public:
        /// \brief 创建桥梁连接件
        ///
        /// \param pDocument 文档指针，输入为空时，创建桥梁连接件失败，返回nullptr
        /// \param pNodeReference 连接件引用对象
        /// \param pEdges 连接件引用对象(边的图形节点)
        /// \param pConnectorShape 连接件形状
        /// \param pConnectorType 连接件类型
        /// \return 创建成功返回桥梁连接件指针，创建失败返回nullptr
        static IFamilyBridgeConnector* Create(gcmp::IDocument* pDocument, const gcmp::IGraphicsNodeReference* pNodeReference, const gcmp::GraphicsNodeReferenceOwnerPtrVector& pEdges, const IFamilyConnectorShape *pConnectorShape, const IFamilyConnectorType *pConnectorType);

        /// \brief 创建桥梁连接件
        ///
        /// \param pDocument 文档指针，输入为空时，创建桥梁连接件失败，返回nullptr
        /// \param pNodeReference 连接件引用对象
        /// \param pEdges 连接件引用对象(边)
        /// \param pConnectorShape 连接件形状
        /// \param pConnectorType 连接件类型
        /// \return 创建成功返回桥梁连接件指针，创建失败返回nullptr
        static IFamilyBridgeConnector* Create(gcmp::IDocument* pDocument, const gcmp::IGraphicsNodeReference* pPlanFace, std::vector<const gcmp::IGraphicsBRepEdge*> pEdges, const IFamilyConnectorShape *pConnectorShape, const IFamilyConnectorType *pConnectorType);

        /// \brief 获取桥梁连接件位置
        /// 
        /// \return 桥梁连接件位置
        virtual FamilyBridgeConnectorPosition GetBridgeConnectorPosition() const = 0;

        /// \brief 设置桥梁连接件位置
        /// 
        /// \param brigdeConnectorPosition 连接件壁厚
        virtual void SetBridgeConnectorPosition(FamilyBridgeConnectorPosition brigdeConnectorPosition) = 0;

        /// \brief 获取湿接缝系统类型
        ///
        /// \return 湿接缝系统类型
        virtual BridgeWetJointType GetWetJointSystemType() const = 0;

        /// \brief 设置湿接缝系统类型
        ///
        /// \param type 湿接缝系统类型
        virtual void SetWetJointSystemType(const BridgeWetJointType& type) = 0;

        /// \brief 获取与之关联的机电连接点的ElementId
        ///
        /// \return 与之关联的机电连接点的ElementId
        virtual gcmp::ElementId GetLinkedConnectorElementId() const = 0;

        /// \brief 获取Implementation Uid
        ///
        /// \return UniIdentity 返回ImplementationUid
        static gcmp::UniIdentity GetImplementationUid();
    };

} 
